package visitor.example;

/**
 * @author cheng:
 * @date 2019/4/27 14:08
 */
public class Test {
    public static void main(String[] args) {
        ObjectStructure structure = new ObjectStructure();

        structure.attach(new Man());
        structure.attach(new WoMan());

        Action success = new Success();
        structure.accept(success);

        Action amativeness = new Amativeness();
        structure.accept(amativeness);

        Action failing = new Failing();
        structure.accept(failing);

        Action marrige = new Marrige();
        structure.accept(marrige);
    }
}
